import http from '@/utils/httpRequest'

function httpRequest (params) {
  return new Promise(resolve => {
    http(params).then(({data}) => {
      if (data && data.code === 0) {
        resolve(data.data)
      }
    })
  })
}

export function getStyleList () {
  const url = http.adornUrl('/style/list')
  return httpRequest({
    url: url,
    method: 'get'
  })
}
